Crate xrpl_api

source ·
Expand description

A low-level crate that extracts the common RPC protocol used by the HTML and WebSocket clients. The data models defined in [types] and [objects] are JSON representations compared to the crate xrpl_types that defines the internal format of the types and objects.

Modules§

  • The account_channels method returns information about an account’s Payment Channels. This includes only channels where the specified account is the channel’s source, not the destination. (A channel’s “source” and “owner” are the same.) All information retrieved is relative to a particular version of the ledger.
  • The account_nfts method returns a list of NFToken objects for the specified account.
  • The account_offers method retrieves a list of offers made by a given account that are outstanding as of a particular ledger version.
  • The account_tx method retrieves a list of transactions that involved the specified account.
  • The book_offers method retrieves a list of offers, also known as the order book, between two currencies.
  • The deposit_authorized command indicates whether one account is authorized to send payments directly to another. See Deposit Authorization for information on how to require authorization to deliver money to your account.
  • The fee command reports the current state of the open-ledger requirements for the transaction cost.
  • The gateway_balances command calculates the total balances issued by a given account, optionally excluding amounts held by operational addresses.
  • The ledger_closed method returns the unique identifiers of the most recently closed ledger. (This ledger is not necessarily validated and immutable yet.)
  • The ledger_current method returns the unique identifiers of the current in-progress ledger. This command is mostly useful for testing, because the ledger returned is still in flux.
  • The ledger_data method retrieves contents of the specified ledger. You can iterate through several calls to retrieve the entire contents of a single ledger version.
  • The manifest method reports the current “manifest” information for a given validator public key. The “manifest” is the public portion of that validator’s configured token. Updated in: rippled 1.7.0
  • The nft_buy_offers method returns a list of buy offers for a given NFToken object.
  • The nft_sell_offers method returns a list of sell offers for a given NFToken object.
  • WebSocket API only! The path_find method searches for a path along which a transaction can possibly be made, and periodically sends updates when the path changes over time. For a simpler version that is supported by JSON-RPC, see the ripple_path_find method. For payments occurring strictly in XRP, it is not necessary to find a path, because XRP can be sent directly to any account.
  • The ping command returns an acknowledgement, so that clients can test the connection status and latency.
  • The random command provides a random number to be used as a source of entropy for random number generation by clients.
  • The ripple_path_find method is a simplified version of the path_find method that provides a single response with a payment path you can use right away. It is available in both the WebSocket and JSON-RPC APIs. However, the results tend to become outdated as time passes. Instead of making multiple calls to stay updated, you should instead use the path_find method to subscribe to continued updates where possible.
  • The server_info command asks the server for a human-readable version of various information about the rippled server being queried.
  • The server_state command asks the server for various machine-readable information about the rippled server’s current state. The response is almost the same as the server_info method, but uses units that are easier to process instead of easier to read. (For example, XRP values are given in integer drops instead of scientific notation or decimal values, and time is given in milliseconds instead of seconds.)
  • The submit method applies a transaction and sends it to the network to be confirmed and included in future ledgers.
  • The subscribe method requests periodic notifications from the server when certain events happen.
  • The transaction_entry method retrieves information on a single transaction from a specific ledger version. (The tx method, by contrast, searches all ledgers for the specified transaction. We recommend using that method instead.)
  • The tx method retrieves information on a single transaction, by its identifying hash.

Structs§

Enums§

Constants§

  • The object was placed as a passive offer
  • The object was placed as a sell offer

Traits§